Optimal. Leaf size=49 \[ -\frac {2 d^2 \sin (a+b x)}{b^3}+\frac {2 d (c+d x) \cos (a+b x)}{b^2}+\frac {(c+d x)^2 \sin (a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3296, 2637} \[ \frac {2 d (c+d x) \cos (a+b x)}{b^2}-\frac {2 d^2 \sin (a+b x)}{b^3}+\frac {(c+d x)^2 \sin (a+b x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 3296
Rubi steps
\begin {align*} \int (c+d x)^2 \cos (a+b x) \, dx &=\frac {(c+d x)^2 \sin (a+b x)}{b}-\frac {(2 d) \int (c+d x) \sin (a+b x) \, dx}{b}\\ &=\frac {2 d (c+d x) \cos (a+b x)}{b^2}+\frac {(c+d x)^2 \sin (a+b x)}{b}-\frac {\left (2 d^2\right ) \int \cos (a+b x) \, dx}{b^2}\\ &=\frac {2 d (c+d x) \cos (a+b x)}{b^2}-\frac {2 d^2 \sin (a+b x)}{b^3}+\frac {(c+d x)^2 \sin (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 44, normalized size = 0.90 \[ \frac {\sin (a+b x) \left (b^2 (c+d x)^2-2 d^2\right )+2 b d (c+d x) \cos (a+b x)}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.57, size = 62, normalized size = 1.27 \[ \frac {2 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right ) + {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - 2 \, d^{2}\right )} \sin \left (b x + a\right )}{b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.40, size = 64, normalized size = 1.31 \[ \frac {2 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )}{b^{3}} + \frac {{\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - 2 \, d^{2}\right )} \sin \left (b x + a\right )}{b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 143, normalized size = 2.92 \[ \frac {\frac {d^{2} \left (\left (b x +a \right )^{2} \sin \left (b x +a \right )-2 \sin \left (b x +a \right )+2 \left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{2}}-\frac {2 a \,d^{2} \left (\cos \left (b x +a \right )+\left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{2}}+\frac {2 c d \left (\cos \left (b x +a \right )+\left (b x +a \right ) \sin \left (b x +a \right )\right )}{b}+\frac {a^{2} d^{2} \sin \left (b x +a \right )}{b^{2}}-\frac {2 a c d \sin \left (b x +a \right )}{b}+c^{2} \sin \left (b x +a \right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.71, size = 136, normalized size = 2.78 \[ \frac {c^{2} \sin \left (b x + a\right ) - \frac {2 \, a c d \sin \left (b x + a\right )}{b} + \frac {a^{2} d^{2} \sin \left (b x + a\right )}{b^{2}} + \frac {2 \, {\left ({\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (b x + a\right )\right )} c d}{b} - \frac {2 \, {\left ({\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (b x + a\right )\right )} a d^{2}}{b^{2}} + \frac {{\left (2 \, {\left (b x + a\right )} \cos \left (b x + a\right ) + {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} d^{2}}{b^{2}}}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.12, size = 84, normalized size = 1.71 \[ \frac {d^2\,x^2\,\sin \left (a+b\,x\right )}{b}-\frac {\sin \left (a+b\,x\right )\,\left (2\,d^2-b^2\,c^2\right )}{b^3}+\frac {2\,c\,d\,\cos \left (a+b\,x\right )}{b^2}+\frac {2\,d^2\,x\,\cos \left (a+b\,x\right )}{b^2}+\frac {2\,c\,d\,x\,\sin \left (a+b\,x\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.54, size = 112, normalized size = 2.29 \[ \begin {cases} \frac {c^{2} \sin {\left (a + b x \right )}}{b} + \frac {2 c d x \sin {\left (a + b x \right )}}{b} + \frac {d^{2} x^{2} \sin {\left (a + b x \right )}}{b} + \frac {2 c d \cos {\left (a + b x \right )}}{b^{2}} + \frac {2 d^{2} x \cos {\left (a + b x \right )}}{b^{2}} - \frac {2 d^{2} \sin {\left (a + b x \right )}}{b^{3}} & \text {for}\: b \neq 0 \\\left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) \cos {\relax (a )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________